<template>
  <div class="table">
    <el-card>
      <el-row>
        <el-button type="success" round @click="addDetails">{{ addInfo }}</el-button>
      </el-row>
      <el-row>
        <slot name="table" />
      </el-row>
    </el-card>
  </div>
</template>

<script>
export default {
  props: {
    addInfo: {
      type: String,
      default: '新增'
    }
  },
  methods: {
    addDetails() {
      this.$router.push({
        name: 'adddetails'
      })
    }
  }
}
</script>

<style lang="scss" scoped>
.el-button--success {
  height: 40px;
  background-color: #00be76;
  margin-left: 10px;
}
.el-row {
  margin-bottom: 20px;
}
</style>
